<?php

class Gallery_model extends CI_Model {


    function __construct()
    {
        // Call the Model constructor
        parent::__construct();
    }
    
    function uploader($destination_file,$file_type){
        $data = array(
            'id'        => 'NULL',
            'file_name' => $destination_file,
            'file_type' => $file_type
        );
        $query = $this->db->insert('user_uploads', $data);
        if ($query)  return 1;
        else return 0;
        
    }

     function pic_list()
    {
         return $this->db->get('user_uploads')->result();

    }


}
    ?>